import React, { Component } from 'react'

export default class Child1 extends Component {
  handleClick = () => {
    // #4 子组件调用父组件传递过来方法的同时并传参
    this.props.changeCount(8)
  }
  render() {
    return (
      <div>
        Child1<button onClick={this.handleClick}>+1</button>
      </div>
    )
  }
}
